/*
 * This file is part of DALS - Distributed Artificial Life Simulation.
 * DALS is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Foobar is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with DALS.  If not, see <http://www.gnu.org/licenses/>.
 */
/*
 * EnvironmentOverview.java
 *
 * Created on 25/10/2010, 14:55:07
 */

package genetic.view;

import genetic.controller.EnvironmentOverviewController;

/**
 *
 * @author romulo
 */
public class EnvironmentOverview extends javax.swing.JFrame {
    private EnvironmentOverviewController controller = new EnvironmentOverviewController();

    /** Creates new form EnvironmentOverview */
    public EnvironmentOverview() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jButtonWatchSimulation = new javax.swing.JButton();
        jButtonEnvironmentConnections = new javax.swing.JButton();
        jButtonEnvironmentDetails = new javax.swing.JButton();
        jButtonEnvironmentConfigurations = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jButtonWatchSimulation.setText("Watch simulation");
        jButtonWatchSimulation.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonWatchSimulationActionPerformed(evt);
            }
        });

        jButtonEnvironmentConnections.setText("Connections management");
        jButtonEnvironmentConnections.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonEnvironmentConnectionsActionPerformed(evt);
            }
        });

        jButtonEnvironmentDetails.setText("Environment details");
        jButtonEnvironmentDetails.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonEnvironmentDetailsActionPerformed(evt);
            }
        });

        jButtonEnvironmentConfigurations.setText("Environment configuration");
        jButtonEnvironmentConfigurations.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonEnvironmentConfigurationsActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jButtonWatchSimulation)
                        .addComponent(jButtonEnvironmentConfigurations, javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jButtonEnvironmentDetails))
                    .addComponent(jButtonEnvironmentConnections))
                .addContainerGap(232, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(58, 58, 58)
                .addComponent(jButtonEnvironmentDetails)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jButtonWatchSimulation)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jButtonEnvironmentConnections)
                .addGap(12, 12, 12)
                .addComponent(jButtonEnvironmentConfigurations)
                .addContainerGap(86, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButtonEnvironmentDetailsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonEnvironmentDetailsActionPerformed
        controller.detailAction();
    }//GEN-LAST:event_jButtonEnvironmentDetailsActionPerformed

    private void jButtonWatchSimulationActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonWatchSimulationActionPerformed
        controller.watchSimulation();
    }//GEN-LAST:event_jButtonWatchSimulationActionPerformed

    private void jButtonEnvironmentConnectionsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonEnvironmentConnectionsActionPerformed
        controller.connections();
    }//GEN-LAST:event_jButtonEnvironmentConnectionsActionPerformed

    private void jButtonEnvironmentConfigurationsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonEnvironmentConfigurationsActionPerformed
        controller.configuration();
    }//GEN-LAST:event_jButtonEnvironmentConfigurationsActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new EnvironmentOverview().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButtonEnvironmentConfigurations;
    private javax.swing.JButton jButtonEnvironmentConnections;
    private javax.swing.JButton jButtonEnvironmentDetails;
    private javax.swing.JButton jButtonWatchSimulation;
    // End of variables declaration//GEN-END:variables

}
